package util

import (
	"image"

	raylib "github.com/gen2brain/raylib-go/raylib"
)

// 将image转换为raylib纹理
func CreateTextureFromImage(img image.Image) raylib.Texture2D {
	rImg := raylib.NewImageFromImage(img)
	defer raylib.UnloadImage(rImg)
	return raylib.LoadTextureFromImage(rImg)
}
